runtime_injector
This library provides a powerful, easy to use inversion-of-control (IoC) container with a focus on ergonomics and configurability.
Getting started
First, configure your injector:
let module = define_module! ;
let mut builder = builder;
builder.add_module;
builder.provide;
Next, create your injector and request your services from it:
let injector = builder.build;
let my_service: = injector.get.unwrap;
let my_interface_impl: = injector.get.unwrap;
// Since `MyService` is transient, we can also request an owned instance of it
let my_service: = injector.get.unwrap;
Minimum supported Rust version
As the library is still in development, the only supported Rust version is the most recent version of stable Rust. The library may work on older versions, but there is no guarantee.
License
This library is licensed under your choice of either MIT or Apache 2.0.